<?php
namespace app\admin\model;
use think\Model;

/**
* 呼叫中心数据模型-基类
*/
class BaseCallCenter extends Model{
    protected	$connection = [
        'type'					=>	'mysql',
        'hostname'				=>	'127.0.0.1',
        'hostport'				=>	'',
        'database'			=>	'',        //	数据库名: 需要自定义
        'username'				=>	'root',
        'password'				=>	'',
        'params'				=>	[],
        'charset'				=>	'utf8',
        'prefix'				=>	'',
    ];

    public function __construct($data = [])
    {
        $this->connection['hostname'] = trim(\Config::get('cc.cc_db_host'));
        $this->connection['hostport'] = trim(\Config::get('cc.cc_db_port'));
        $this->connection['username'] = trim(\Config::get('cc.cc_db_user'));
        $this->connection['password'] = trim(\Config::get('cc.cc_db_password'));

        parent::__construct($data);
    }

}
